/*
 * Synaptics TCM touchscreen driver
 *
 * Copyright (C) 2017-2018 Synaptics Incorporated. All rights reserved.
 *
 * Copyright (C) 2017-2018 Scott Lin <scott.lin@tw.synaptics.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
 * EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
 * AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
 * IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
 * WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
 * AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 * NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
 * THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION DOES
 * NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES, SYNAPTICS'
 * TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT EXCEED ONE HUNDRED U.S.
 * DOLLARS.
 */

&i2c_1 {
	status = "ok";
	qcom,disable-dma;
	synaptics_tcm@20 {
		compatible = "synaptics,tcm-i2c";
		com,i2c-touch-active = "synaptics,tcm-i2c";
		reg = <0x20>;
		//interrupt-parent = <&msm_gpio>;
		interrupt-parent = <&tlmm>;
		interrupts = <67 0x2008>;
		vdd-supply = <&pm660_l11>;
		//avdd-supply = <&pm8994_l22>;
		pinctrl-names = "pmx_ts_active", "pmx_ts_suspend";
		pinctrl-0 = <&ts_active>;
		pinctrl-1 = <&ts_int_suspend>;
		synaptics,bus-reg-name = "vdd";
		//synaptics,pwr-reg-name = "avdd";
		//synaptics,irq-gpio = <&msm_gpio 67 0x2008>; /* IRQF_ONESHOT | IRQF_TRIGGER_LOW */
		synaptics,irq-gpio = <&tlmm 67 0x2008>; /* IRQF_ONESHOT | IRQF_TRIGGER_LOW */
		synaptics,irq-on-state = <0>;
		//synaptics,reset-gpio = <&msm_gpio 66 0x0000>;
		synaptics,reset-gpio = <&tlmm 66 0x0000>;
		synaptics,reset-on-state = <0>;
		synaptics,reset-active-ms = <20>;
		synaptics,reset-delay-ms = <200>;
		synaptics,power-delay-ms = <200>;
		synaptics,ubl-i2c-addr = <0x20>;
	};
};
